﻿using System.Collections.Generic;
using System.Linq;
using System.Web.Services;
using System.Web.Script.Services;

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class Autocomplete : System.Web.Services.WebService
{
    [WebMethod]
    public List<CustomClient> FetchClientListByName(string name)
    {
         BLLLaundry bll = new BLLLaundry();
            var fetchClients = bll.GetClientsList(name);
            return fetchClients.ToList();
    }
    [WebMethod]
    public List<CustomClient> FetchClientListByDocument(string document)
    {
        BLLLaundry bll = new BLLLaundry();
        var fetchClients = bll.GetClientsListByDocument(document);
        return fetchClients.ToList();
    }
}
public class CustomClient
{
    public long Id { get; set; }
    public string Name { get; set; }
    public string Document { get; set; }
    public string Phone { get; set; }
    public string Address { get; set; }
}

